#ifndef FUNCTION_HPP
#define FUNCTION_HPP


enum FunctionCode{
	DISPLAY_AD                      = 1,   //请求显示广告
	DISPLAY_AD_SUCCESS              = 2,   //返回广告
	DISPLAY_COMMODITY               = 3,   //请求显示商品信息
	DISPLAY_COMMODITY_SUCCESS       = 4,   //返回商品信息
	TRADE                           = 5,   //请求提交订单
	RECIVE_TRADE                    = 6,   //返回已接收到订单信息
	TRADE_OVERTIME                  = 7,   //提交订单60s无操作
	TRADE_CANCEL                    = 8,   //顾客取消支付
	TRADE_SUCCESS                   = 9,   //支付成功
	CHANGE_MACHINE_DATA             = 10,  //发送销售记录
	CHANGE_MACHINE_DATA_SUCCESS     = 11,  //服务器应答已记录销售记录
	LOG_IN_CONSERVATOR              = 21,  //请求登录柜机
	LOG_IN_CONSERVATOR_ERR          = 22,  //登录柜机失败
	LOG_IN_CONSERVATOR_SUCCESS      = 23,  //登录柜机成功
	SAVE_MACHINE_SALE               = 24,  //柜机返回操作日志
	SAVE_MACHINE_SALE_SUCCESS       = 25,  //服务器应答已记录操作日志
	LOG_IN                          = 31,  //请求登录
	USER_NAME_ERR                   = 32,  //登录失败，帐户名不存在
	PASSWORD_ERR                    = 33,  //登录失败，密码错误
	LOG_IN_SUCCESS                  = 34,  //登录成功
	REGISTER                        = 35,  //请求注册
	REGISTER_FAIL                   = 36,  //注册失败，帐户名已存在
	REGISTER_SUCCESS                = 37,  //注册成功
	CHANGE_PASSWORD                 = 38,  //申请修改密码
	CHANGE_PASSWORD_SUCCESS         = 39,  //修改成功
	RETRIEVE_PASSWORD               = 40,  //申请找回密码
	RETRIEVE_PASSWORD_ERR           = 41,  //未找到用户名，找回密码失败
	RETRIEVE_PASSWORD_SUCCESS       = 42,  //搜索到用户名，返回密码，密保问题和密保答案
	BIND_MACHINE                    = 43,  //申请注册柜机(绑定柜机)
	BIND_MACHINE_ERR                = 44,  //柜机号已存在，注册失败
	BIND_MACHINE_SUCCESS            = 45,  //柜机注册成功
    CHANGE_MACHINE_PASSWORD         = 46,  //申请修改柜机密码
    CHANGE_MACHINE_PASSWORD_SUCCESS = 47,  //柜机密码修改成功
    REMOVE_MACHINE                  = 48,  //申请删除柜机(解除绑定)
    REMOVE_MACHINE_ERR              = 49,  //柜机号不存在，删除失败
    REMOVE_MACHINE_SUCCESS          = 50,  //删除柜机成功
    CHOOSE_MAC                      = 51,  //申请选择柜机
    CHOOSE_MAC_FAIL                 = 52,  //还没有柜机
    CHOOSE_MAC_SUCCESS              = 53,  //返回已拥有的柜机编号
    CHECK_COMMODITY                 = 54,  //查看商品信息
    CHECK_COMMODITY_DATA_SUCCESS    = 55,  //返回已拥有的商品信息
    CHECK_COMMODITY_DATA_FAIL       = 56,  //没有商品信息
    ADD_COMMODITY_DATA              = 57,  //申请增加商品信息
    ADD_COMMODITY_DATA_SUCCESS      = 58,  //增加成功
    ADD_COMMODITY_DATA_FAIL         = 59,  //增加失败
    CHANGE_COMMODITY_DATA           = 60,  //申请修改商品信息
    CHANGE_COMMODITY_DATA_SUCCESS   = 61,  //修改成功
    REMOVE_COMMODITY_DATA           = 62,  //申请删除商品信息
    REMOVE_COMMODITY_DATA_SUCCESS   = 63,  //删除成功
    CHECK_COMMODITY_SALE            = 64,  //请求查看柜机销售额
    CHECK_COMMODITY_SALE_SUCCESS    = 65,  //服务器返回销售日志
	CHANGE_COMMODITY_DATA_FAIL      = 66,  //修改商品信息失败
    REMOVE_COMMODITY_DATA_FAIL      = 67,  //删除商品信息失败
    CHECK_COMMODITY_SALE_FAIL       = 68   //查看销售额失败
};

#endif
